package com.sensetime.jv.feign;

import com.sensetime.jv.config.FeignConfig;
import com.sensetime.jv.vo.request.ManualPermissionRequestVO;
import com.sensetime.jv.vo.request.UrlRolePermissionRespVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name="auth",path = "auth",configuration = FeignConfig.class)
public interface AuthFeignService {

    @PostMapping("/feign/sync/manual")
    Void syncPermissions(@RequestBody List<ManualPermissionRequestVO> list);

    @PostMapping("/feign/permission/list")
    List<UrlRolePermissionRespVO> getAllPermissions();
}
